<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Honor extends Controller{
	var $title='honor';
	var $view='honor';
	var $table='honor';  //数据库表名称，无需更改
	
	function Honor(){
		parent::Controller();	
		$this->load->model("dataset_atom","my_model");
		$this->my_model->table_name($this->table);
	}
	function index(){
		include_once 'inc/Init.php';
		$this->load->library('pager');
		$this->load->database();
		$where=array('type_id'=>$kind_id,'show'=>1);
		$page=intval($this->uri->segment(6,1));
		$each=16;
		$this->pager->init(array(
			'table'=>$this->my_model->table_name(),
			'link'=>site_url("{$this->title}/index/$kind_url/{page}"),
			'where'=>$where,
			'page'=>$page,
			'each'=>$each,
		));
		$this->db->select('*');
		$this->db->order_by("sort_id","desc");
		list($page_link,$data,$page,$total,$max_page)=$this->pager->create_link();
		$this->load->view($this->view,get_defined_vars());
	}
}